package pong.game.location;

import pong.general.GameWindow;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class LoaderTexture 
{
	public static Bitmap getBitmap(Context appContext, int resourceId, float height, float width) 
	{
	    return Bitmap.createScaledBitmap(getBitmapFromResource(appContext, resourceId),
	    		(int)(width * GameWindow.widthWorld), 
	    		(int)(height * GameWindow.heightWorld), 
	    		true);
	}
	public static Bitmap getBitmapFromResource(Context appContext, int resourceId) 
	{
	    return BitmapFactory.decodeResource(appContext.getResources(), resourceId);
	} 
}
